

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>7.1. VideoTester.measures.core — Generic superclasses &mdash; VideoTester 0.2 documentation</title>
    
    <link rel="stylesheet" href="_static/default.css" type="text/css" />
    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
    
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '',
        VERSION:     '0.2',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="_static/jquery.js"></script>
    <script type="text/javascript" src="_static/underscore.js"></script>
    <script type="text/javascript" src="_static/doctools.js"></script>
    <link rel="shortcut icon" href="_static/VTfavicon.png"/>
    <link rel="top" title="VideoTester 0.2 documentation" href="index.html" />
    <link rel="up" title="7. VideoTester.measures — Measures package" href="measures.html" />
    <link rel="next" title="7.2. VideoTester.measures.qos — QoS measures" href="qos.html" />
    <link rel="prev" title="7. VideoTester.measures — Measures package" href="measures.html" /> 
  </head>
  <body>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="qos.html" title="7.2. VideoTester.measures.qos — QoS measures"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="measures.html" title="7. VideoTester.measures — Measures package"
             accesskey="P">previous</a> |</li>
        <li><a href="index.html">VideoTester 0.2 documentation</a> &raquo;</li>
          <li><a href="modules.html" >Module Reference</a> &raquo;</li>
          <li><a href="measures.html" accesskey="U">7. <tt class="docutils literal docutils literal docutils literal docutils literal"><span class="pre">VideoTester.measures</span></tt> &#8212; Measures package</a> &raquo;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <div class="section" id="module-VideoTester.measures.core">
<span id="videotester-measures-core-generic-superclasses"></span><h1>7.1. <tt class="docutils literal"><span class="pre">VideoTester.measures.core</span></tt> &#8212; Generic superclasses<a class="headerlink" href="#module-VideoTester.measures.core" title="Permalink to this headline">¶</a></h1>
<dl class="class">
<dt id="VideoTester.measures.core.Measure">
<em class="property">class </em><tt class="descclassname">VideoTester.measures.core.</tt><tt class="descname">Measure</tt><a class="headerlink" href="#VideoTester.measures.core.Measure" title="Permalink to this definition">¶</a></dt>
<dd><p>Generic measure.</p>
<dl class="method">
<dt id="VideoTester.measures.core.Measure.calculate">
<tt class="descname">calculate</tt><big>(</big><big>)</big><a class="headerlink" href="#VideoTester.measures.core.Measure.calculate" title="Permalink to this definition">¶</a></dt>
<dd><p>Compute the measure.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Results (see <a class="reference internal" href="#VideoTester.measures.core.Measure.data" title="VideoTester.measures.core.Measure.data"><tt class="xref py py-attr docutils literal"><span class="pre">data</span></tt></a>).</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">dictionary</td>
</tr>
</tbody>
</table>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">This method MUST be overwritten by the subclasses.</p>
</div>
</dd></dl>

<dl class="attribute">
<dt id="VideoTester.measures.core.Measure.data">
<tt class="descname">data</tt><em class="property"> = None</em><a class="headerlink" href="#VideoTester.measures.core.Measure.data" title="Permalink to this definition">¶</a></dt>
<dd><p>Dictionary of results. Contents:</p>
<ul>
<li><p class="first"><cite>name</cite>: The name.</p>
</li>
<li><p class="first"><cite>units</cite>: The units (e.g.: <tt class="docutils literal"><span class="pre">'ms'</span></tt>, <tt class="docutils literal"><span class="pre">['time</span> <span class="pre">(s)',</span> <span class="pre">'kbps']</span></tt>, etc.).</p>
</li>
<li><dl class="first docutils">
<dt><cite>type</cite>: The type: <cite>plot</cite>, <cite>bar</cite>, <cite>value</cite> or <cite>videoframes</cite>.</dt>
<dd><ul class="first last simple">
<li>If <tt class="docutils literal"><span class="pre">type</span> <span class="pre">=</span> <span class="pre">'plot'</span></tt>: <cite>axes</cite>, <cite>max</cite>, <cite>min</cite>, <cite>mean</cite>.</li>
<li>If <tt class="docutils literal"><span class="pre">type</span> <span class="pre">=</span> <span class="pre">'bar'</span></tt>: <cite>axes</cite>, <cite>max</cite>, <cite>min</cite>, <cite>mean</cite>, <cite>width</cite>.</li>
<li>If <tt class="docutils literal"><span class="pre">type</span> <span class="pre">=</span> <span class="pre">'value'</span></tt>: <cite>value</cite>.</li>
<li>If <tt class="docutils literal"><span class="pre">type</span> <span class="pre">=</span> <span class="pre">'videoframes'</span></tt>: <cite>axes</cite>.</li>
</ul>
</dd>
</dl>
</li>
</ul>
</dd></dl>

<dl class="method">
<dt id="VideoTester.measures.core.Measure.graph">
<tt class="descname">graph</tt><big>(</big><em>x</em>, <em>y</em><big>)</big><a class="headerlink" href="#VideoTester.measures.core.Measure.graph" title="Permalink to this definition">¶</a></dt>
<dd><p>Set <cite>axes</cite>, <cite>max</cite>, <cite>min</cite> and <cite>mean</cite> for <cite>bar</cite> or <cite>plot</cite> graphs (see <a class="reference internal" href="#VideoTester.measures.core.Measure.data" title="VideoTester.measures.core.Measure.data"><tt class="xref py py-attr docutils literal"><span class="pre">data</span></tt></a>).</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>x</strong> (<a class="reference external" href="http://docs.python.org/library/functions.html#list" title="(in Python v2.7)"><em>list</em></a>) &#8211; x axis.</li>
<li><strong>y</strong> (<a class="reference external" href="http://docs.python.org/library/functions.html#list" title="(in Python v2.7)"><em>list</em></a>) &#8211; y axis.</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="VideoTester.measures.core.Meter">
<em class="property">class </em><tt class="descclassname">VideoTester.measures.core.</tt><tt class="descname">Meter</tt><a class="headerlink" href="#VideoTester.measures.core.Meter" title="Permalink to this definition">¶</a></dt>
<dd><p>Generic meter.</p>
<dl class="attribute">
<dt id="VideoTester.measures.core.Meter.measures">
<tt class="descname">measures</tt><em class="property"> = None</em><a class="headerlink" href="#VideoTester.measures.core.Meter.measures" title="Permalink to this definition">¶</a></dt>
<dd><p>List of measures.</p>
</dd></dl>

<dl class="method">
<dt id="VideoTester.measures.core.Meter.run">
<tt class="descname">run</tt><big>(</big><big>)</big><a class="headerlink" href="#VideoTester.measures.core.Meter.run" title="Permalink to this definition">¶</a></dt>
<dd><p>Run registered measures. For each measure in <a class="reference internal" href="#VideoTester.measures.core.Meter.measures" title="VideoTester.measures.core.Meter.measures"><tt class="xref py py-attr docutils literal"><span class="pre">measures</span></tt></a>, this method calls <a class="reference internal" href="#VideoTester.measures.core.Measure.calculate" title="VideoTester.measures.core.Measure.calculate"><tt class="xref py py-meth docutils literal"><span class="pre">Measure.calculate()</span></tt></a>.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">The list of measures.</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">list</td>
</tr>
</tbody>
</table>
</dd></dl>

</dd></dl>

</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
            <p class="logo"><a href="index.html">
              <img class="logo" src="_static/VT200x170.png" alt="Logo"/>
            </a></p>
  <h4>Previous topic</h4>
  <p class="topless"><a href="measures.html"
                        title="previous chapter">7. <tt class="docutils literal docutils literal docutils literal"><span class="pre">VideoTester.measures</span></tt> &#8212; Measures package</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="qos.html"
                        title="next chapter">7.2. <tt class="docutils literal docutils literal"><span class="pre">VideoTester.measures.qos</span></tt> &#8212; QoS measures</a></p>
  <h3>This Page</h3>
  <ul class="this-page-menu">
    <li><a href="_sources/m-core.txt"
           rel="nofollow">Show Source</a></li>
  </ul>
<div id="searchbox" style="display: none">
  <h3>Quick search</h3>
    <form class="search" action="search.html" method="get">
      <input type="text" name="q" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    <p class="searchtip" style="font-size: 90%">
    Enter search terms or a module, class or function name.
    </p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="qos.html" title="7.2. VideoTester.measures.qos — QoS measures"
             >next</a> |</li>
        <li class="right" >
          <a href="measures.html" title="7. VideoTester.measures — Measures package"
             >previous</a> |</li>
        <li><a href="index.html">VideoTester 0.2 documentation</a> &raquo;</li>
          <li><a href="modules.html" >Module Reference</a> &raquo;</li>
          <li><a href="measures.html" >7. <tt class="docutils literal docutils literal docutils literal docutils literal"><span class="pre">VideoTester.measures</span></tt> &#8212; Measures package</a> &raquo;</li> 
      </ul>
    </div>
    <div class="footer">
        &copy; Copyright 2013, Iñaki Úcar.
      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3.
    </div>
  </body>
</html>